import {createApp} from 'vue'
import Window from "./Window.vue";
export default function install(app: any) {
  // console.log(Window);
  // console.log(app);

  app.component("window", Window);
  // // 全局方法：打开 Window 组件
  // app.config.globalProperties.openWindow = function (options: any) {
  //   const container = document.createElement("div");
  //   document.body.appendChild(container);
  //   const winApp = createApp(Window, options);
  //   return winApp.mount(container);
  // };

  // // 全局方法：关闭 Window 组件
  // app.config.globalProperties.closeWindow = function (componentInstance: any) {
  //   componentInstance.$destroy();
  //   componentInstance.$el.remove();
  // };
}
